/**
 * Copyright 2010 upTick Pty Ltd
 *
 * Licensed under the terms of the GNU General Public License version 3 
 * as published by the Free Software Foundation. You may obtain a copy of the
 * License at: http://www.gnu.org/copyleft/gpl.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations 
 * under the License.
 */

package au.com.uptick.serendipity.server.domain.dao;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public final class Emf {

    // <persistence-unit name="au.com.uptick.serendipity" transaction-type="RESOURCE_LOCAL">
    private static final EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("au.com.uptick.serendipity");

    public static EntityManagerFactory get() {
        return entityManagerFactory;
    }

    private Emf() {
    }
}


/*
  // HSQLDB default user name = "sa" and password = ""
  Map<String, String> properties = new HashMap<String, String>();
  properties.put("javax.persistence.jdbc.user", "sa");
  properties.put("javax.persistence.jdbc.password", "");
  emf = Persistence.createEntityManagerFactory("au.com.uptick.serendipity", properties);

*/
